package common.controls.item.attribute
{
	import com.netease.protobuf.Int64;
	
	import common.controls.item.events.ItemAttributeEvent;
	
	import flash.events.EventDispatcher;
	import flash.events.IEventDispatcher;
	
	[Event(name="changedstack", type="common.events.ItemAttributeEvent")]
	
	/**  
	 * 
	 * @author carrey
	 * */ 
	public class ItemAttribute extends EventDispatcher
	{
		
		private var _id:Int64;			// 道具id
		private var _itemId:uint;	// 物品id
		private var _type:uint;		// 道具type
		private var _name:String = "";//名称
		private var _bindType:uint;//绑定类型
		private var _stack:uint;			// 堆叠数量(不可堆叠道具=0xFFFF)
		private var _isActivate:Boolean;  	// 是否激活
		private var _activateTime:uint;	// 总期限 或 使用期限 (秒)
		private var _position:uint;	// 位置
		private var _containerType:uint;// 容器类型   1:背包
		private var _charm:uint;	//魅力
		
		private var _useLevel:uint;// 使用等级
		private var _sex:uint;// 性别
		private var _currencyType:uint;// 货币类型  0:金币  1：银币
		private var _currencyNum:uint;// 货币大小
		private var _stackTotal:uint;// 堆叠总量
		private var _renewal:uint;// 续费类型
		private var _renewalNum:uint;//续费金额
		private var _description:String="";// 描述
		
		public function ItemAttribute(target:IEventDispatcher=null)
		{
			super(target);
		}

		public function get sex():uint
		{
			return _sex;
		}

		public function set sex(value:uint):void
		{
			_sex = value;
		}

		public function get description():String
		{
			return _description;
		}

		public function set description(value:String):void
		{
			_description = value;
		}

		public function get charm():uint
		{
			return _charm;
		}

		public function set charm(value:uint):void
		{
			_charm = value;
		}

		public function get itemId():uint
		{
			return _itemId;
		}

		public function set itemId(value:uint):void
		{
			_itemId = value;
		}

		public function get renewalNum():uint
		{
			return _renewalNum;
		}

		public function set renewalNum(value:uint):void
		{
			_renewalNum = value;
		}

		public function get renewal():uint
		{
			return _renewal;
		}

		public function set renewal(value:uint):void
		{
			_renewal = value;
		}

		public function get stackTotal():uint
		{
			return _stackTotal;
		}

		public function set stackTotal(value:uint):void
		{
			_stackTotal = value;
		}

		public function get currencyNum():uint
		{
			return _currencyNum;
		}

		public function set currencyNum(value:uint):void
		{
			_currencyNum = value;
		}

		public function get currencyType():uint
		{
			return _currencyType;
		}

		public function set currencyType(value:uint):void
		{
			_currencyType = value;
		}

		public function get useLevel():uint
		{
			return _useLevel;
		}

		public function set useLevel(value:uint):void
		{
			_useLevel = value;
		}

		public function get containerType():uint
		{
			return _containerType;
		}

		public function set containerType(value:uint):void
		{
			_containerType = value;
		}

		public function get position():uint
		{
			return _position;
		}

		public function set position(value:uint):void
		{
			_position = value;
		}

		public function get activateTime():uint
		{
			return _activateTime;
		}

		public function set activateTime(value:uint):void
		{
			_activateTime = value;
		}

		public function get isActivate():Boolean
		{
			return _isActivate;
		}

		public function set isActivate(value:Boolean):void
		{
			_isActivate = value;
		}

		public function get stack():uint
		{
			return _stack;
		}

		public function setStack(value:uint,isEvent:Boolean=false):void
		{
			_stack = value;
			if(isEvent)
			{
				dispatchEvent(new ItemAttributeEvent(ItemAttributeEvent.CHANGED_STACK,_stack));
			}
		}

		public function get bindType():uint
		{
			return _bindType;
		}

		public function set bindType(value:uint):void
		{
			_bindType = value;
		}

		public function get name():String
		{
			return _name;
		}

		public function set name(value:String):void
		{
			_name = value;
		}

		public function get type():uint
		{
			return _type;
		}

		public function set type(value:uint):void
		{
			_type = value;
		}

		public function get id():Int64
		{
			return _id;
		}

		public function set id(value:Int64):void
		{
			_id = value;
		}
		

	}
}